(define (make-segment start-point end-point)
  (cons point-x point-y))

(define (start-segment line)
  (car line))

(define (end-segment line)
  (cdr line))

(define (make-point x y)
  (cons x y))

(define (x-point point)
  (car point))

(define (y-point point)
  (cdr point))

(define (midpoint-segment line)
  (cons (/ (+ (x-point (start-segment line) (x-point (end-segment line)))) 2)
        (/ (+ (y-point (start-segment line) (y-point (end-segment line)))) 2)))

(define (print-point p)
  (newline)
  (display "(")
  (display (x-point p))
  (display ",")
  (display (y-point p))
  (display ")"))
